package com.night.administration.service.impl;

import com.night.administration.mapper.TeacherMapper;
import com.night.administration.service.TeacherService;
import com.night.common.entity.administration.Teacher;
import com.night.common.entity.administration.Test;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

/**
 * @ClassName: TeacherService
 * @Description: //TODO
 * @author: LZJ
 * @date: 2022/10/19-9:48
 * @version: v1.0
 */
@Service("TeacherService")
@Transactional
public class TeacherServiceImpl implements TeacherService {

    @Resource
    private TeacherMapper teacherMapper;

    @Override
    public void insert(Teacher teacher) {
        teacherMapper.insert(teacher);
    }

    @Override
    public Teacher getTeacher(int teachersId) {
        return teacherMapper.getTeacher(teachersId);
    }

    @Override
    public List<Teacher> getAll() {
        return teacherMapper.getAll();
    }

    @Override
    public void update(Teacher teacher) {
        teacherMapper.update(teacher);
    }

    @Override
    public String getTeacherNameByTeacherId(int teacherId) {
        return teacherMapper.getTeacherNameByTeacherId(teacherId);
    }


}
